Invoking Sniffaccess

Sniffaccess can be invoked in three ways:

- by a single request on the command line
- interactively
- in batch mode with a command file

A single request on the command line
Sniffaccess sends the request to sniff , prints the reply and terminates.
Usage:
% sniffaccess [-q] REQUEST [ARGUMENTS]

- Note that the -q flag can be used for all requests. It suppresses output of

sniff status and information comments. Data output is not suppressed.
Example:
% sniffaccess open_project $SHARED_WE/pe/sniff.shared
Interactively
Starting Sniffaccess without arguments will prompt you for Sniffaccess commands.
Usage:
% sniffaccess
Example:
% sniffaccess
sniffaccess: connected to sniffappcomm
sniffaccess: setting timeout to 20 seconds
> browse_class * ActionButton
sniffaccess: port number of sniff is 1000
sniff: OKAY
> edit_symbol * ActionButton::GetMinSize METHOD_IMPL
sniff: ERROR: ActionButton::GetMinSize: symbol not found
> edit_symbol */ ActionButton::GetMinSize METHOD_IMPL
sniff: OKAY
> exit
sniffaccess: disconnecting from sniffappcomm
%
Batch mode with a command file
Sniffaccess can also be started with input redirect from a command file.
Usage:
% sniffaccess < COMMAND_FILE
COMMAND_FILE contains a list of requests, one request per line. Comments start with `#' and end with the next newline.
Example COMMAND_FILE :
#
# An example file for SNiFF+ external access
#
# Sets the maximum time to wait for a reply from sniff to 60 seconds.
# Loads a project and then registers for all possible actions inside sniff,
# waits for notifications and echoes each notification.
set_timeout 60 # timeout is 60 seconds
open_project /Projects/SNiFF+/SharedWE/HEAD/pe/sniff.shared
register * * post nowait echo
Multiple simultaneous Sniffaccess sessions
You can have multiple Sniffaccess sessions running at the same time. To do so, type the following on the command line:
% sniffaccess -s <sniffaccess_session_name>
<sniffaccess_session_name> is a "session id" that uniquely identifies each Sniffaccess session. Note that the session id is a string and cannot contain any blank spaces within it.
To get a list of the currently active SNiFF+ sessions, type:
% sniffaccess -i
When you execute this command, you will get output similar to the following:
Current active SNiFF+ sessions
session0
session1
To connect to an active SNiFF+ session, select one of the session id's and use it for <sniffaccess_session_name> above.